NDepend.API Documentation
CompileMany(IEnumerable<String>,ICompareContext) Method
NDepend.CodeQuery Namespace > ExtensionMethodsQuery Class > CompileMany Method : CompileMany(IEnumerable<String>,ICompareContext) Method
This collection of code queries string.
The NDepend.CodeModel.ICompareContext object against which to compile.
Compile several code queries contained in this collection of string, against a NDepend.CodeModel.ICompareContext object. This overload of CompileMany(IEnumerable<String>,ICodeBase) is required if some code queries are meant to be executed in a comparison context.
Syntax

Parameters

queryStrings
This collection of code queries string.
compareContext
The NDepend.CodeModel.ICompareContext object against which to compile.

Return Value

A read-only list of code queries compiled, with a count equals to queryStrings.Count.
Remarks
The NDepend.CodeModel.ICompareContext object is needed because some code queries might reference some code elements by name.
In such situation, code elements are resolved by name against the code base ICompareContext.NewerCodeBase.
To compile N CQLinq queries strings, calling once CompileMany() is much faster than calling N times Compile().
The property IQueryCompiledSuccess.IQueryCompiledSuccess.RelyOnCompareContext is equal to true if a code query is meant to be executed in a comparison context.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsQuery Class
ExtensionMethodsQuery Members
Overload List
ICompareContext Interface
CreateCompareContextWithOlder Method
ExtensionMethodsCQLinqCompare Class
RelyOnCompareContext Property
Compile(String,ICompareContext) Method
TryCompareSourceWith(ISourceDecl,ISourceDecl) Method